package lzy.service.impl;

import lzy.entity.FarmOperation;
import lzy.mapper.FarmOperationMapper;
import lzy.service.FarmOperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FarmOperationServiceImpl implements FarmOperationService {
    @Autowired
    private FarmOperationMapper mapper;

    @Override
    public void save(FarmOperation operation) {
        mapper.insert(operation);
    }

    @Override
    public java.util.List<FarmOperation> findAll() {
        return mapper.findAll();
    }

    @Override
    public java.util.List<FarmOperation> findByFilter(String mainType, String baseId, String startDate, String endDate) {
        return mapper.findByFilter(mainType, baseId, startDate, endDate);
    }

    @Override
    public int countHarvest() {
        return mapper.countHarvest();
    }
} 